package com.serviceprovider.business.module.admin.bonus.utility;

//~--- non-JDK imports --------------------------------------------------------

import com.serviceprovider.business.module.admin.bonus.services.dao.interfaces.IBonusService;

//~--- JDK imports ------------------------------------------------------------

import java.util.Timer;
import java.util.TimerTask;

public class BonusPaymentTask extends TimerTask {
    private IBonusService bonusService;

    public BonusPaymentTask(IBonusService bonusService) {
        this.bonusService = bonusService;

        Timer t = new Timer();

        t.schedule(this, 1000, 1800000);
    }

    public void run() {
        bonusService.executeScheduledPayments();
    }
}



